home *** CD-ROM | disk | FTP | other *** search
/ Tech Arsenal 1 / Tech Arsenal (Arsenal Computer).ISO / tek-02 / hdebug.zip / HDEBUG10.TXT < prev    next >
Text File  |  1991-10-20  |  2KB  |  54 lines

  1.  
  2.                            HDEBUG.DOC
  3.                   Documentation for HDEBUG.PAS
  4.          (C) Copyright 1991, Brian D. Webb & P-Machinery
  5.                   Release 1.0, October 20, 1991
  6.  
  7.  
  8. These routines are just a stripped down version of a heap debugging package
  9. that I'm working on.  HEAP.TPU contains routines to intercept EVERY call to
  10. TP6's heap routines New(),Dispose(),GetMem(), and FreeMem(), including the
  11. new extended syntax for New() and Dispose().  Since the heart of these
  12. routines is the heap interceptor, I thought I'd send it out for a little
  13. beta testing while I iron out the bugs in the rest of the package.
  14.  
  15. These routines work for the IDE, Turbo Debugger, and standalone EXE files.
  16.  
  17. To intercept the heap routines, the variables HEAP.Allocation_Handler and
  18. HEAP.Deallocation_Handler need to contain the addresses of far routines of
  19. type Handler, which is:
  20.  
  21. type
  22.   Handler = Procedure(Size : Word; BlockAddr,CallAddr : Pointer);
  23.  
  24. The interceptor will pass along the size of the memory block, its address,
  25. and the address of the calling routine to the handler for error checking.
  26.  
  27. The unit HDEBUG10.PAS contains a generic handler which can flag the user
  28. whenever a potential fatal heap error has occured without exiting the
  29. debugging session.
  30.  
  31. The unit MAPINFO.PAS allows HDEBUG10.PAS to determine the unit and line
  32. number of the error.
  33.  
  34.  
  35.  
  36.  
  37. To use:
  38.  
  39. Include the units (Heap,HDebug10,MapInfo) in your uses clause.
  40.  
  41. In your main program, be sure to set MapFileName to the path name of the
  42. map file.  Also, be sure to compile to disk and generate a detailed map
  43. file.
  44.  
  45. To activate the heap interceptor, call the procedure HeapOn.
  46. To deactivate, call HeapOff.
  47.  
  48.  
  49. Please forward comments and criticisms to:
  50.    Brian D. Webb
  51.    76436,1131
  52.  
  53. If you need help really bad, give me a call at 713-427-0071
  54.